home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / ftn / readrg.z / readrg
Encoding:
Text File  |  2002-10-03  |  5.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. rrrreeeeaaaaddddRRRRGGGG((((3333GGGG))))                                                          rrrreeeeaaaaddddRRRRGGGG((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      rrrreeeeaaaaddddRRRRGGGG - gets values of specific pixels
  10.  
  11. FFFFOOOORRRRTTTTRRRRAAAANNNN 77777777 SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      iiiinnnntttteeeeggggeeeerrrr****4444 ffffuuuunnnnccccttttiiiioooonnnn rrrreeeeaaaaddddRRRRGGGG((((nnnn,,,, rrrreeeedddd,,,, ggggrrrreeeeeeeennnn,,,, bbbblllluuuueeee))))
  13.      iiiinnnntttteeeeggggeeeerrrr****4444 nnnn
  14.      cccchhhhaaaarrrraaaacccctttteeeerrrr****((((****)))) rrrreeeedddd,,,, ggggrrrreeeeeeeennnn,,,, bbbblllluuuueeee
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _n       expects the number of pixels to be read by the function.
  18.  
  19.      _r_e_d     expects the array in which the pixel red values will be stored.
  20.  
  21.      _g_r_e_e_n   expects the array in which the pixel green values will be stored.
  22.  
  23.      _b_l_u_e    expects the array in which the pixel blue values will be stored.
  24.  
  25. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  26.      The returned value of this function is the number of pixels actually
  27.      read.  A returned function value of 0 indicates an error, namely, that
  28.      the starting point is not a valid character position.
  29.  
  30. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  31.      rrrreeeeaaaaddddRRRRGGGG attempts to read up to _n pixel values from the bitplanes in RGB
  32.      mode.  It reads them into the _r_e_d, _g_r_e_e_n, and _b_l_u_e arrays starting from
  33.      the current character position along a single scan line (constant _y) in
  34.      the direction of increasing _x.  rrrreeeeaaaaddddRRRRGGGG returns the number of pixels read,
  35.      which is the number requested if the starting point is a valid character
  36.      position (inside the current viewport).  rrrreeeeaaaaddddRRRRGGGG returns zero if the
  37.      starting point is not a valid character position.  The values of pixels
  38.      read outside of the viewport or screen are undefined.
  39.  
  40.      rrrreeeeaaaaddddRRRRGGGG updates the current character position to one pixel to the right
  41.      of the last one read; the current character position is undefined if the
  42.      new position is outside the viewport.
  43.  
  44.      Pixels are read from the currently active framebuffer, as specified by
  45.      ddddrrrraaaawwwwmmmmoooo.
  46.  
  47.      Thus, to read pixel values from the overlay bitplanes, for example,
  48.      simply set ddddrrrraaaawwwwmmmmoooo to OOOOVVVVEEEERRRRDDDDRRRR.  Use rrrreeeeaaaaddddssssoooo to specify the pixel source
  49.      within the current framebuffer (backbuffer, frontbuffer, or z-buffer, for
  50.      example) from which both rrrreeeeccccttttrrrreeee and
  51.       llllrrrreeeeccccttttrrrr take pixel values.
  52.  
  53.      In RGB double buffer mode, only the back buffer is read by default.  On
  54.      machines that support it, you can use rrrreeeeaaaaddddssssoooo to control which buffer is
  55.      read.
  56.  
  57.      The system must be in RGB mode for rrrreeeeaaaaddddRRRRGGGG to function correctly.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rrrreeeeaaaaddddRRRRGGGG((((3333GGGG))))                                                          rrrreeeeaaaaddddRRRRGGGG((((3333GGGG))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      lrectr, readso, drawmo
  76.  
  77. NNNNOOOOTTTTEEEESSSS
  78.      rrrreeeeaaaaddddRRRRGGGG should not be used in new development.  Rather, pixels should be
  79.      read using the high-performance llllrrrreeeeccccttttrrrr command.
  80.  
  81.      This routine is available only in immediate mode.
  82.  
  83.      RGB pixels are written as 24-bit RGB triples. On systems with less than
  84.      the full bitplane configuration, the least significant bits of each R, G,
  85.      and B value are not used when pixels are read from the framebuffer.  This
  86.      means that on 8-bit systems, the least significant 5 bits of each RGB
  87.      value are not used, and on 12 bitplane systems, the least significant 4
  88.      bits are set not used.
  89.  
  90.      On IRIS-4D GT and GTX models, returned bits that do not correspond to
  91.      valid bitplanes are undefined. Other models return zero in these bits.
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.